<template>
  <div>
    <Pager :total="total" :current="current" @pageChange="handlePageChange" />
  </div>
</template>

<script>
import Pager from "./";
export default {
  components: {
    Pager,
  },
  data() {
    return {
      current: 1,
      total: 300,
    };
  },
  methods: {
    handlePageChange(newPage) {
      //也可以在上面调用的时候传($event)
      this.current = newPage;
    },
  },
};
</script>

<style scoped>

</style>